Skip to content

[ModelicaSystem] split simulate() into two methods #311

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

syntron
Copy link
Contributor

@syntron syntron commented Jun 25, 2025

[ModelicaSystem] split simulate() into two methods

(1) create ModelicasystemCmd instance - simulate_cmd()
(2) run it - simulate()

reason:

  • use the instances of ModelicaSystemCmd to run the executeable with different settings as often as needed

syntron added 2 commits June 26, 2025 20:39
(1) create ModelicasystemCmd instance - simulate_cmd()
(2) run it - simulate()
@syntron syntron force-pushed the ModelicaSystem_simulate branch from b57bd0c to 3ee7f7d Compare June 28, 2025 19:26
Copy link
Member

@adeas31 adeas31 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't understand what this change is doing. Maybe you can add a simple usage as test.

@syntron
Copy link
Contributor Author

syntron commented Jul 1, 2025

@adeas31 splitting simulate into two parts allows to define the command to run the executable without running it. Thus, several runs can be defined and later be executed using the same executable. See PR #312; it also contains an example as unittest where this is used.

The example runs a DoE including structural and non-structural parameters. While any combination of non-structural parameters can be run using the same executable, any change of a structural parameter needs a rebuild of the executable. The new class - ModelicaSystemDoE - prepares all runs of the DoE (builing the model executable if needed) and then executes them in parallel.

This also relates to issue #230

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants